
#include "misc.h"
#include "task/task.h"
#include "textmode/textmode.h"

void* isr80h_command_00_sum(struct interrupt_frame* frame)
{
    const int x2 = (int)task_get_stack_item(get_current_task(), 1); 
    const int x1 = (int)task_get_stack_item(get_current_task(), 0); 


    return (void*)(x1 + x2); 
}

void* isr80h_command_01_print(struct interrupt_frame* frame)
{
    char* msg = (char*)task_get_stack_item(get_current_task(), 0); // unsafe to print msg directly, we should copy it to kernel buffer
    char buf[1024]; 
    copy_string_from_task(get_current_task(), msg, buf, sizeof(buf)); 
    print(buf); 

    return (void*)0; 
}